# -*- codeing =utf-8 -*-
# @Time : 2022/9/13 上午10:15
# @Author :WXJ
# @File : 3.3.py
# @Software: PyCharm
import random

daizis=[[],[],[]]
ye=["红","黄","蓝"]

nums=list(range(1,10))
print("球的序号为：",nums)
i=0

for num in nums:
    index=random.randint(0,2)#随机生成
    daizis[index].append(num)#随机到一个位置

for qdaizi in daizis: #把一个袋子拿出来
    print("%s袋子里的球的个数为：%d"%(ye[i],len(qdaizi)))
    i +=1
    for name in  qdaizi:
        print("%s"%name,end="\t")
    print("\n")
    print("-"*20)